System and method for hardware based reassembly of a fragmented packet

ABSTRACT

A system and method for hardware based reassembly of a fragmented packet is shown. The method includes receiving a bandwidth request to transfer a data packet from the data provider. Then, bandwidth is allocated to the data provider, where the allocated bandwidth is less than the requested bandwidth. Next, the present invention receives part of the data packet in the allocated bandwidth from the data provider, where the part of the data packet includes a fragment header, and the fragment header includes a sequence number for the part of the data packet. The part of the data packet is then stored in external memory. Finally, the data packet is reassembled by concatenating in the correct sequence the part of the data packet with other parts of the data packets to create the reassembled data packet.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. Non-Provisional Applicationentitled “System and Method for Hardware Based Reassembly of aFragmented Packet,” Ser. No. 09/960,725, filed Sep. 24, 2001 now U.S.Pat. No. 6,779,050, which is incorporated herein in its entirety byreference.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention is generally related to offloading cable modemtermination system (CMTS) software by using hardware to reassemblefragmented frames or packets from a cable modem.

2. Related Art

The importance to the modem economy of rapid data access and exchangecannot be overstated. This explains the exponentially increasingpopularity of the data access and exchange via cable networks (includingcoaxial cable or Hybrid fiber coaxial cable), the Internet, intranets,wireless networks, satellites, optical and so forth (i.e., communicationmediums). Rapid data access and exchange is partly dependent upon howefficiently bandwidth is allocated to a data provider in order for thedata provider to transfer the requested data to a user via one of thecommunication mediums mentioned above.

One very desirable solution for rapid data access and exchange is viacable networks and cable modems. Cable modems provide asynchronouscommunications on cable networks. In general, a user connects a cablemodem to the TV outlet for his or her cable TV, and the cable TVoperator connects a cable modem termination system (“CMTS”) in theoperator's headend. The CMTS is a central device for connecting thecable network to a data network like the Internet. The CMTS is a centraldistribution point for a cable system. Data flows “downstream” from theCMTS to the cable modem (i.e., downstream communication). Alternatively,data flows “upstream” from the cable modem to the CMTS (i.e., upstreamcommunication).

A common cable modem standard today is the Data Over Cable ServiceInterface Specification (“DOCSIS”). DOCSIS defines technicalspecifications for both cable modems and CMTS.

In general, a cable modem forwards or provides data via asynchronouscommunications on cable networks. The cable modem receives data from auser that needs to be transferred via a cable network. For many types ofdata, in order for the cable modem to transfer the data via a cablenetwork it must request that the CMTS grant to it the necessarybandwidth to send a data packet or frame. At times the CMTS only grantsthe cable modem enough bandwidth to send part of the packet. In thiscase, the cable modem sends as much of the packet as will fit in thebandwidth grant, along with a special “fragment header” indicating thatit is sending a fragment and including a sequence number for thefragment and flags indicating when the fragment is the first or lastfragment of the packet. With fragmentation, a cyclic redundancy check(CRC) is appended to the fragment that covers only the bytes in thefragment.

Subsequent bandwidth grants from the CMTS may be large enough to fillall or part of the remainder of the packet. In the case where only partof the remainder of the packet fits in the granted bandwidth, the cablemodem sends another fragment as above, and so on until the entireremainder of the packet fits in a bandwidth grant. When the cable modemsends a final fragment in the packet, the cable modem sets a flagindicating that this fragment is the last fragment in the packet.

At the CMTS, fragments sent by the cable modem must be reassembled toreconstruct the original frame or packet by the CMTS software. Thereassembly operation involves removing the special fragment header andCRC, combining the data from each fragment in the correct order,maintaining the session state, and using the session state to check forerror conditions such as lost fragments or incorrect sequence numbers.These functions must be performed separately for each cable modem (i.e.,data provider) and for each flow from a particular cable modem.

The reassembly of fragmented frames is handled by software running on anembedded CPU in the CMTS. This requires the CMTS software to do detailedparsing of every frame, even non-fragmented ones (since arrival of anon-fragmented frame can affect the state of a fragmentation session).This burden on software reduces system performance and increases cost byrequiring a higher performance CPU or multiple CPUs.

SUMMARY OF THE INVENTION

The present invention, by using hardware instead of software toreassemble fragmented frames or packets from a data provider, obtainssignificant savings in CPU cycles for the CMTS software.

In an embodiment of the present invention, the method includes receivinga bandwidth request to transfer a data packet from the data provider.Then, bandwidth is allocated to the data provider, where the allocatedbandwidth is less than the requested bandwidth. Next, the presentinvention receives part of the data packet in the allocated bandwidthfrom the data provider, where the part of the data packet includes afragment header, and the fragment header includes a sequence number forthe part of the data packet. The part of the data packet is then storedin external memory. Finally, the data packet is reassembled byconcatenating in the correct sequence the part of the data packet withother parts of the data packets to create the reassembled data packet.

BRIEF DESCRIPTION OF THE FIGURES

The present invention will be described with reference to theaccompanying drawings, wherein:

FIG. 1 is a block diagram representing an example operating environmentaccording to an embodiment of the present invention.

FIG. 2 illustrates a high level operational embodiment of the presentinvention.

FIG. 3 is a block diagram illustrating how CMTS, CMTS scheduler, cablemodem scheduler, cable modem and reassembly processor may be implementedaccording to an embodiment of the invention.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

A. Overview of the Invention

The present invention, by using hardware instead of software toreassemble fragmented frames or packets from a data provider, obtainssignificant savings in CPU cycles for the CMTS software. Forillustration purposes, the present invention is described in terms ofbeing utilized with a cable network. It should be understood that thepresent invention is not limited to use with a cable network. In fact,the present invention may be used with any communication medium,including but not limited to, the Internet, intranets, fiber opticnetworks, wireless networks and satellites.

Data in the present invention includes any type of information that isdeterministic (such as voice traffic), as well as with best effort datatraffic including but not limited to digital, voice, video, and audio.An example operating environment of the present invention is describednext.

B. Example Operating Environment

FIG. 1 is a block diagram representing an example operating environmentof the present invention. It should be understood that the exampleoperating environment in FIG. 1 is shown for illustrative purposes onlyand does not limit the invention. Referring to FIG. 1, a cable modemtermination system (CMTS) 102, a cable modem 104, downstreamcommunication 108 and upstream communication 106 are shown. Cable modem104 further includes a cable modem scheduler 110. CMTS 102 furtherincludes a CMTS scheduler 112, a MAC 113 (media access controller) andan external memory 120. MAC 113 includes a reassembly processor 114 andan internal memory 116. Internal memory 116 includes a SID (serviceidentifier) table 118. External memory 120 includes a SID table 122.Each of these components will be briefly described next.

In general, cable modem 104 forwards or provides data via asynchronouscommunications on cable networks via upstream communication 106. Cablemodem 104 receives data from a user that needs to be transferred via acable network. For many types of data, in order for cable modem 104 totransfer the data via a cable network it must request that CMTS 102grant to it the necessary bandwidth via downstream communication 108 tosend a data packet or frame.

Cable modem scheduler 110 of cable modem 104 is responsible formultiplexing the internal traffic (i.e., requesting the necessarybandwidth that cable modem 104 needs to transfer its current types ofdata). Cable modem scheduler 110 must take into consideration thedifferent priorities given to the current data to be transferred and torequest bandwidth from CMTS 102 accordingly.

CMTS 102 is a central device for connecting the cable network to a datanetwork. CMTS scheduler 112 is a bandwidth manager that decides how togrant available bandwidth according to the current bandwidth requests. Aconnection admission control (not shown) decides whether or not to admitmore traffic in the system.

As mentioned above, in order for cable modem 104 to transfer data via acable network it must request that CMTS 102 grant to it the necessarybandwidth via downstream communication 108 to send a data packet orframe. At times CMTS 102 only grants cable modem 104 enough bandwidth tosend part of the packet. In this case, cable modem 104 sends as much ofthe packet as will fit in the bandwidth grant, along with a special“fragment header” indicating that it is sending a fragment. The fragmentheader includes, but is not limited to, a sequence number for thefragment (indicating the fragment's order in the data packet) and flagsindicating when the fragment is the first or last fragment of thepacket. With fragmentation, a CRC (cyclic redundancy check) is appendedto the fragment that covers only the bytes in the fragment. CRC isdescribed in more detail below.

Subsequent bandwidth grants from CMTS 102 may be large enough to fillall or part of the remainder of the packet. In the case where only partof the remainder of the packet fits in the granted bandwidth, cablemodem 104 sends another fragment as above, and so on until the entireremainder of the packet fits in a bandwidth grant. When cable modem 104sends a final fragment in the packet, cable modem 104 sets a flagindicating that this fragment is the last fragment in the packet.

Reassembly processor 114 is responsible for reassembling the datafragments, thereby offloading the CMTS software. Reassembly processor114 maintains SID table 118 in internal memory 116 and SID table 122 inexternal memory 120.

SID table 118 in internal memory 116 contains a bit per SID to indicateif a reassembly session is in progress for that SID. The presentinvention use of internal memory 116 reduces processing time andimproves performance since the “session in progress” status must bechecked for every packet that arrives from cable modem 104 and access tointernal memory 116 is much faster than access to external memory 120.If there is no reassembly session in progress, SID table 122 of externalmemory 120 need not be accessed at all, so the choice of the presentinvention to store the information it does in internal memory 116 alsogives a performance improvement. SID table 122 in external memory 120stores all other state information for reassembly sessions in progress.

Internal table 118 in internal memory 116 is kept small by the presentinvention to reduce silicon area, yet provides the critical informationto decide if further action is required in low latency internal memory.The larger state information is kept in external memory 120.

Reassembly processor 114 provides a method to detect fragment receivedfrom cable modem 104. The fragments are associated by the SID numberfrom which the fragment was received and the sequence number containedin the fragment header. Received fragments are stored in external memory120 until all fragments of a particular session are received. Correctsequencing of the fragments are assured by the sequence number. Once thelast flag indicates that all fragments are received, reassemblyprocessor 114 reassembles the fragments by concatenating the correctlysequenced fragments. When a sequencing error occurs, then the receivedfragment is discarded. Key features of the present invention is theability to store packets or fragments for varying amounts of time andthe ability to tag the fragments with the SID and sequence numbers.

As stated above, a CRC is appended to the fragment that covers only thebytes in the fragment. A CRC is created by passing the fragment datathrough an algorithm (either hardware and/or software) to create aunique value from the fragment data. This value (i.e., CRC) is sentalong with the packet to CMTS 102, and at CMTS 102 the same operation isrepeated and the new value compared to the sent value. If the two valuesmatch, then there is a high probability the received data is correct.

The details of how reassembly processor 114 of present inventionbypasses the CMTS software and reassembles fragmented frames or packetsfrom a data provider (thereby obtaining significant savings in CPUcycles for the CMTS software), is described next with the flowchart inFIG. 2.

C. Method of the Present Invention According to an Embodiment

The flowchart in FIG. 2 starts at step 202. In step 202, cable modem 104requests bandwidth from CMTS 102 in order to transmit a data packet.Control then passes to step 204.

In step 204, CMTS 102 grants to cable modem 104 bandwidth that cannotaccommodate the entire original data packet. Control then passes to step206.

In step 206, cable modem 104 fits as much data as possible into thegranted bandwidth. Control then passes to step 208.

In step 208, cable modem 104 attaches a fragment header and a CRC to thefragment and forwards the fragment in the granted bandwidth toreassembly processor 114. Control then passes to step 210.

In step 210, reassembly processor 114 tags the fragment with the SID andsequence number and stores the fragment in external memory 120 for thefragment session. For the first fragment of the data packet, reassemblyprocessor 114 indicates in SID table 118 in internal memory 116 that areassembly session is in progress for the SID. Control then passes tostep 211.

In step 211, reassembly processor 114 checks for error conditions. Anerror condition would occur if one of the fragments was lost while itwas being transferred from cable modem 104 via upstream communication.Reassembly processor 114 notes this type of error when there is amissing sequence number (e.g., the sequence numbers have incremented bya number other than one). Also, if reassembly processor 114 receives afirst flag set for a different SID prior to it receiving the last flagset for the SID being processed, then it knows the last fragment for theSID being processed has been lost. Control then passes to step 212.

In step 212, if an error has been detected, then control passes to step216 where the reassembly session is aborted and external memoryreleased. Alternatively, control passes to step 213.

In step 213, reassembly processor 114 determines whether the lastfragment received has its last flag set in the header fragment. If thelast flag is set (indicating that this fragment is the last fragment inthe data packet), then control passes to step 214. If the last flag isnot set (indicating that there are still more fragments remaining in thedata packet), then control passes to step 204. Here, steps 204 through212 are repeated until the last flag is set in a fragment.

In step 214, reassembly processor 114 concatenates the fragments in thecorrect sequence based on the sequence numbers of the fragments. Thelogic of the present invention performs reassembly including errorchecking. In an embodiment, the combination of fragments into a completepacket is accomplished with a linked list data structure. Here, wheneach new fragment is stored to memory, a pointer to it is stored alongwith the previous fragment. When the last bit indicates that the finalfragment has been linked to the list, all fragments are read inbeginning with the first and following the links in the linked list tosubsequent fragments to give the whole packet (or frame). An advantageof using a linked list data structure is that memory can be allocated infragment-sized chunks and as many chunks as needed can be linkedtogether, rather than allocating enough memory for a maximum-lengthreassembled packet even if the final reassembled packet ends up beingshorter in length. Control then passes to step 216.

In step 216, reassembly processor 114 aborts the reassembly session andreleases the memory utilized in external memory 120 to store thefragments. The number of reassembly sessions is not limited by theprocessing of reassembly processor 114 itself, but only by memoryavailable to hold fragments. Reassembly processor 114 also indicates inSID table 118 in internal memory 116 that a reassembly session is nolonger in progress for the SID. A mechanism may also be provided by theinvention to enable manual aborting of reassembly sessions. To use thismechanism, the CMTS software indicates for which SID it wants to abortreassembly, and reassembly processor 114 frees up any memory in use andclears the state for that reassembly session. The CMTS software coulduse the manual aborting feature of the present invention when itdeallocates a SID in order to guarantee that memory in use for fragmentsfrom the deallocated SID is freed. The flowchart in FIG. 2 ends at thispoint.

D. Example Environment of the Present Invention

CMTS 102, CMTS scheduler 112, cable modem 104, cable modem scheduler110, MAC 113 and reassembly processor 114 may be implemented usingcomputer 300 as shown in FIG. 3. Obviously, more than one of thesefunctional components could be implemented on a single computer 300.

The present invention may be implemented using hardware, software or acombination thereof and may be implemented in a computer system or otherprocessing system. In fact, in one embodiment, the invention is directedtoward one or more computer systems capable of carrying out thefunctionality described herein. The computer system 300 includes one ormore processors, such as processor 304. The processor 304 is connectedto a communication bus 306. Various software embodiments are describedin terms of this example computer system. After reading thisdescription, it will become apparent to a person skilled in the relevantart how to implement the invention using other computer systems and/orcomputer architectures.

Computer system 300 also includes a main memory 308, preferably randomaccess memory (RAM), and can also include a secondary memory 310. Thesecondary memory 310 can include, for example, a hard disk drive 312and/or a removable storage drive 314, representing a floppy disk drive,a magnetic tape drive, an optical disk drive, etc. The removable storagedrive 314 reads from and/or writes to a removable storage unit 318 in awell known manner. Removable storage unit 318, represents a floppy disk,magnetic tape, optical disk, etc. which is read by and written to byremovable storage drive 314. As will be appreciated, the removablestorage unit 318 includes a computer usable storage medium having storedtherein computer software and/or data.

In alternative embodiments, secondary memory 310 may include othersimilar means for allowing computer programs or other instructions to beloaded into computer system 300. Such means can include, for example, aremovable storage unit 322 and an interface 320. Examples of such caninclude a program cartridge and cartridge interface (such as that foundin video game devices), a removable memory chip (such as an EPROM, orPROM) and associated socket, and other removable storage units 322 andinterfaces 320 which allow software and data to be transferred from theremovable storage unit 318 to computer system 300.

Computer system 300 can also include a communications interface 324.Communications interface 324 allows software and data to be transferredbetween computer system 300 and external devices. Examples ofcommunications interface 324 can include a modem, a network interface(such as an Ethernet card), a communications port, a PCMCIA slot andcard, etc. Software and data transferred via communications interface324 are in the form of signals which can be electronic, electromagnetic,optical or other signals capable of being received by communicationsinterface 324. These signals 326 are provided to communicationsinterface via a channel 328. This channel 328 carries signals 326 andcan be implemented using wire or cable, fiber optics, a phone line, acellular phone link, an RF link and other communications channels.

In this document, the terms “computer program medium” and “computerusable medium” are used to generally refer to media such as removablestorage device 318, a hard disk installed in hard disk drive 312, andsignals 326. These computer program products are means for providingsoftware to computer system 300.

Computer programs (also called computer control logic) are stored inmain memory and/or secondary memory 310. Computer programs can also bereceived via communications interface 324. Such computer programs, whenexecuted, enable the computer system 300 to perform the features of thepresent invention as discussed herein. In particular, the computerprograms, when executed, enable the processor 304 to perform thefeatures of the present invention. Accordingly, such computer programsrepresent controllers of the computer system 300.

In an embodiment where the invention is implemented using software, thesoftware may be stored in a computer program product and loaded intocomputer system 300 using removable storage drive 314, hard drive 312 orcommunications interface 324. The control logic (software), whenexecuted by the processor 304, causes the processor 304 to perform thefunctions of the invention as described herein.

In another embodiment, the invention is implemented primarily inhardware using, for example, hardware components such as applicationspecific integrated circuits (ASICs). Implementation of the hardwarestate machine so as to perform the functions described herein will beapparent to persons skilled in the relevant art(s). In yet anotherembodiment, the invention is implemented using a combination of bothhardware and software.

E. Conclusion

While various embodiments of the present invention have been describedabove, it should be understood that they have been presented by way ofexample, and not limitation. It will be apparent to persons skilled inthe relevant art that various changes in form and detail may be madetherein without departing from the spirit and scope of the invention.This is especially true in light of technology and terms within therelevant art(s) that may be later developed. Thus, the present inventionshould not be limited by any of the above-described example embodiments,but should be defined only in accordance with the following claims andtheir equivalents.

1. An apparatus comprising: a cable modem termination system forreceiving a bandwidth request to transfer a data packet from a dataprovider, wherein said cable modem termination system allocatesbandwidth to the data provider, wherein said allocated bandwidth is lessthan said requested bandwidth, wherein said cable modem terminationsystem receives part of said data packet in said allocated bandwidthfrom the data provider, wherein said part of said data packet includesinformation indicating whether a reassembly session is in progress and afragment header, wherein said fragment header includes a sequence numberfor said part of said data packet; and a reassembly processor forstoring said part of said data packet in external memory, wherein saidreassembly processor reassembles said data packet by concatenating inthe correct sequence said part of said data packet with other parts ofsaid data packet, thus forming a reassembled data packet.
 2. Theapparatus of claim 1, wherein said data provider is a cable modem. 3.The apparatus of claim 1, wherein said reassembly processor uses alinked list to reassemble said reassembled data packet.
 4. The apparatusof claim 1, wherein said reassembly processor performs error checking onsaid reassembled data packet.
 5. The apparatus of claim 1, wherein saidreassembled data packet is associated with a service identifier.
 6. Asystem for reassembling fragmented packets from a data provider,comprising: means for allocating bandwidth to a data provider totransfer a data packet from the provider, wherein said allocatedbandwidth is less than a requested bandwidth amount; means for receivingpart of said data packet in said allocated bandwidth from the dataprovider, wherein said part of said data packet includes a fragmentheader, wherein said fragment header includes a sequence number for saidpart of said data packet; means for tagging said part of said datapacket with information indicating whether a reassembly session is inprogress; means for storing said part of said data packet in externalmemory; and means for reassembling said data packet by concatenating inthe correct sequence said part of said data packet with other parts ofsaid data packet, thus forming a reassembled data packet.
 7. The systemof claim 6, wherein said data provider is a cable modem.
 8. The systemof claim 6, wherein said means for reassembling uses a linked list toreassemble said reassembled data packet.
 9. The system of claim 6,further comprising a means for error checking said reassembled datapacket.
 10. The system of claim 6, wherein said reassembled data packetis associated with a service identifier.